package ch08.test.cn.cvs.service;

import ch08.test.cn.cvs.dao.StorageMapper;
import ch08.test.cn.cvs.entity.Storage_Record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Transactional
@Service("storageService")
public class StorageServiceImpl implements StorageService{
@Autowired
private StorageMapper storageMapper;
    @Override
    public int insert(Storage_Record storageRecord) {
        return storageMapper.insert(storageRecord);
            }

    @Override
    public int delete(int id) {
        return storageMapper.delete(id);
    }

    @Override
    public int update(Storage_Record storageRecord, int id) {
        return storageMapper.update(storageRecord,id);
    }
}
